Skip to content

feat(c-examples): aviation foundation + c-tool-calls + c-subagents (PR 1 of 4)#347

Merged
blove merged 7 commits into
mainfrom
chat-examples-llm-aviation-pr1
May 16, 2026
Merged

feat(c-examples): aviation foundation + c-tool-calls + c-subagents (PR 1 of 4)#347
blove merged 7 commits into
mainfrom
chat-examples-llm-aviation-pr1

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 16, 2026

Summary

PR 1 of 4 in the c-* aviation theme rollout (spec: `docs/superpowers/specs/2026-05-16-c-examples-aviation-foundation-design.md`, plan: `docs/superpowers/plans/2026-05-16-c-examples-aviation-foundation.md`).

  • Aviation foundation: `aviation_data.py` (10 airports, 4 airlines, 30 flights — all canned for deterministic demos) + `aviation_tools.py` (`lookup_flight`, `get_airport_info`, `find_routes`).
  • c-tool-calls: converted from single-node stub to a canonical agent ↔ ToolNode loop bound with the 3 aviation tools. The chat-tool-calls cockpit demo now actually shows real tool-call streaming + tool-result rendering.
  • c-subagents: converted from single-node stub to an orchestrator LLM with a `task(role, task_description)` tool that dispatches to 3 specialized subagent functions (research / booking / itinerary). The orchestrator's prompt directs sequential invocation. Chat-subagents UI auto-renders `task` tool calls as subagent cards (matches the chat lib's default `subagentToolNames = ['task']`).
  • Aviation prompts for both: `tool-calls.md` + `subagents.md` rewritten to match the new graph behavior.

Spec correction landed inline (Task 0)

The spec's original decision 6 was wrong — chat lib's subagent UI is driven by tool calls named `task` (default), not by `AIMessage(name=...)`. Correction in the spec markdown is the first commit of this PR.

Out-of-scope (PR 2-4)

  • PR 2: aviation prompts for the other 7 simple c-* graphs (messages/input/debug/interrupts/theming/threads/timeline)
  • PR 3: c-generative-ui dashboard → airline KPI dashboard
  • PR 4: c-a2ui contact form → aviation booking form

Test plan

  • `uv sync` clean
  • `from src.chat_graphs import c_tool_calls, c_subagents` returns successfully (graphs compile)
  • Tool descriptions accessible to LLM
  • CI verifies python build/test
  • Manual chrome MCP smoke (post-merge): chat-tool-calls ("What's the status of UA123?") and chat-subagents ("Plan a trip from LAX to JFK")

🤖 Generated with Claude Code

blove and others added 7 commits May 15, 2026 17:59
Builds shared aviation mock data + tool library, then uses them to make
c-tool-calls and c-subagents actually do what their prompts claim.
Today both are single-node system_prompt+LLM stubs whose prompts
promise tool calls / subagent orchestration the graphs don't perform.

PR 1 establishes the aviation theme with 3 tools (lookup_flight,
get_airport_info, find_routes) backed by ~10 airports, ~4 airlines,
~30 flights. c-tool-calls becomes a canonical agent ↔ ToolNode loop;
c-subagents becomes a sequential trip-planner pipeline (research →
booking → itinerary), each subagent emitting AIMessage with a
distinguishing name= so the chat-subagents UI renders distinct cards.

PR 2-4 extend the aviation theme to the other 9 c-* examples.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment May 16, 2026 1:33am

Request Review

@blove blove merged commit f215550 into main May 16, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant